
inherit eutils webapp

MY_VERSION="weathermap4rrd-php-1.2final"

DESCRIPTION="Weathermap4RRD is a network map PNG picture generator"
HOMEPAGE="http://weathermap4rrd.tropicalex.net/"
SRC_URI="http://weathermap4rrd.tropicalex.net/code/${MY_VERSION}.tgz"
SRC_URI="${SRC_URI} http://weathermap4rrd.tropicalex.net/code/weathermap.conf"

S=${WORKDIR}/weathermap4rrd-php-1.2rc8

LICENSE="GPL"
KEYWORDS="~alpha ~amd64 ~ppc sparc x86"

IUSE=""
DEPEND=""

RDEPEND="www-servers/apache
	net-analyzer/rrdtool
	media-libs/gd
        virtual/php
        virtual/httpd-php"

src_unpack() {
	unpack ${MY_VERSION}.tgz
	cd ${S}
	einfo "${S}"
	cp ${FILESDIR}/weathermap.conf .
}

pkg_setup() {
	webapp_pkg_setup
}

src_compile() {
	einfo "Nothing to compile."
}

src_install() {
	webapp_src_preinst

	dodoc LICENSE INSTALL LICENCE README
	rm LICENSE INSTALL LICENCE README

	edos2unix `find -type f -name '*.php'`

	dodir ${MY_HTDOCSDIR}
	cp -r . ${D}${MY_HTDOCSDIR}

	webapp_configfile ${MY_HTDOCSDIR}/config.php
	webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt

	webapp_src_install
}

